//
//  ZZChooseLabelCell.m
//  Qzone
//
//  Created by zhangxy on 2018/6/19.
//  Copyright © 2018年 zhang. All rights reserved.
//

#import "ZZChooseLabelCell.h"

@implementation ZZChooseLabelCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [_labName setFont:FontFiftent];
    [_labName setTextColor:UIColorFromRGB(TextSizeOneColor)];
    
    [_btnNum.titleLabel setFont:FontThirteen];
    [_btnNum setTitleColor:UIColorFromRGB(TextSizeEightColor) forState:0];
    [_btnNum setImage:[UIImage imageNamed:@"btn_heat"] forState:0];
}

-(void)dataToView:(id) data index:(BOOL ) isCheck{
    [_labName setTextColor:UIColorFromRGB(TextSizeOneColor)];
    
    if([data isKindOfClass:[NavTypeEntity class]]){
        NavTypeEntity *entity = data;
        
        if(convertToString(entity.cat_name).length > 0){
            [_labName setText:entity.cat_name];
        }else if(convertToString(entity.tag_name).length > 0){
            [_labName setText:entity.tag_name];
        }
        if(isCheck){
            [_labName setTextColor:UIColorFromRGB(BgTitleColor)];
        }
        _btnNum.hidden = YES;
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
